//
//  CityIndexModel.m
//  YXFinance
//
//  Created by uplooking on 2018/10/26.
//  Copyright © 2018年 CRLong. All rights reserved.
//

#import "CityIndexModel.h"

@implementation CityIndexModel


+ (instancetype)initWithDictionary:(NSDictionary *)dictionary{
    
    CityIndexModel * model = [[CityIndexModel alloc]init];
    
    model.c_id = dictionary[@"id"];
    model.name = dictionary[@"name"];
    
    NSArray * cArray = dictionary[@"child"];
    NSMutableArray * temp = [NSMutableArray array];
    
    for (NSDictionary * item in cArray) {
        
        CityIndexModel * cModel = [CityIndexModel initWithDictionary:item];
        [temp addObject:cModel];
    }
    
    model.child = temp;
    
    return model;
}

@end
